#include "verilated_vcd_c.h"
#include "Vsoc_axi_lite_top.h"
#include <cstdio>
#include <cstdlib>

uint32_t time = 0;

int main(int argc, char ** argv)
{
  Verilated::commandArgs(argc, argv);
  Verilated::traceEveron(true);
  
  VerilatedVcdC *trace_file = new VerilatedVcdC;
  
  Vsoc_axi_lite_top *top = new Vsoc_axi_lite_top("top");
  
  top->trace(trace_file, 0);
  trace_file->open("wave.vcd");
  
  while (time < 20 && !Verilated::gotFinish()) {
    top->resetn = 0;
    top->clk = 0;
    top->switch = 0;
    top->btn_key_row = 0;
    top->btn_step = 0;
    
    top->eval();
    trace_file->dump(time);
    time++;
  }
  top->finial();
  trace_file->close();
  delete top;
  delete trace_file;
  
  return 0;
}
